home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Word / U-V / Virus < prev    next >
Text File  |  1988-04-09  |  13KB  |  244 lines

  1. This originally appeared on the Washington Apple Pi TCS
  2.  
  3. All information is from Dave Lavery.
  4. If you encounter this virus please contact at him at:
  5.       (202) 453-2720 (work) [the area code might be 703 or 301)
  6. We have discovered a new virus that is circulating through the  
  7. Macintosh community.  This is not the now-infamous MacMag virus,  
  8. but is a completely new and, as far as I can tell, unreported  
  9. version. As of this date, we have not determined exactly what the  
  10. virus does other than replicate itself.  Because we do not know  
  11. exactly what this thing does yet, we are very concerned about the  
  12. possibility of any invisible operations and "time bombs" that it  
  13. may contain.  The presence of the virus in the Macintosh memory  
  14. does causes several symptoms, which have caused losses of data.   
  15. These symptoms include difficulty running MacDraw, difficulty  
  16. printing from any applications (especially MacDraw),  difficulty  
  17. using the "Set Startup" option, difficulty running Excel,  
  18. corruption of Excel files, and frequent crashes when starting  
  19. applications.  This virus has existed since at least February,  
  20. 1988, and may have been around as early as September, 1987. 
  21.  
  22. Identification of "infection": 
  23.  
  24. It is possible to determine if this virus has infected your  
  25. Macintosh with the following procedure:  1) Open the System Folder  
  26. of the Macintosh and locate the "Note Pad File" and "Scrapbook  
  27. File".  2) Examine the icons used on these files and check that  
  28. they resemble the small Macintoshes seen on the "System" and  
  29. "Finder" icons.  If they do not, and instead resemble the standard  
  30. Macintosh document icon (an upright piece of paper with the upper  
  31. right corner folded forward), you are probably infected.  3) To  
  32. verify infection, execute ResEdit or some other utility which can  
  33. see "invisible" files.  Examine the System Folder.  4) If the  
  34. System Folder contains two invisible files named "Desktop" and  
  35. "Scores", you are definitely infected. 
  36.  
  37. The infection process: 
  38.  
  39. The virus transmits itself from Macintosh to Macintosh by invading  
  40. a standard executable application file on a contaminated  
  41. Macintosh.  When this contaminated application is copied to a  
  42. "sterile" Macintosh, the virus attacks the new system by making  
  43. these changes to the System Folder:  three INIT resources are  
  44. added to the "System" file.  If the files "Note Pad File" and  
  45. "Scrapbook File" do not exist in the System Folder, they are  
  46. created.  The type and creator fields of the "Note Pad File" are  
  47. changed from "ZSYS" and "MACS" to "INIT" and "ZSYS", respectively,  
  48. and an INIT resource is added to the file.  The type and creator  
  49. fields of the "Scrapbook File" are changed from "ZSYS" and "MACS"  
  50. to "RDEV" and "ZSYS", respectively, and an INIT resource is added  
  51. to the file.  Two new, invisible file are added to the system  
  52. folder, named "Desktop" and "Scores", each with an atpl, DATA and  
  53. INIT resource.  These changes are summarized below: 
  54.  
  55.  FILE           TYPE CREATOR NEW? INVIS?  RESOURCES     SIZE      
  56.  System         ZSYS  MACS    No    No   INIT ID=6      772 bytes 
  57.                                               ID=10    1020 bytes 
  58.                                               ID=17     480 bytes 
  59.  Desktop        INIT  FNDR   Yes   Yes   atpl ID=128   2410 bytes 
  60.                                          DATA ID=-4001 7026 bytes 
  61.                                          INIT ID=10    1020 bytes 
  62.  Note Pad File  INIT  ZSYS    No    No   INIT ID=6      772 bytes 
  63.  Scores         RDEV  ZSYS   Yes   Yes   atpl ID=128   2410 bytes 
  64.                                          DATA ID=-4001 7026 bytes 
  65.                                          INIT ID=10    1020 bytes 
  66.  Scrapbook File RDEV  ZSYS    No    No   INIT ID=17     480 bytes 
  67.                                               ID=6      772 bytes 
  68.  
  69. Note that, unlike the MacMag virus, no "nVIR" resource are used  
  70. anywhere.  The modified files, "Note Pad" and "Scrapbook", still  
  71. appear to function normally with the Note Pad and Scrapbook Desk  
  72. Accessories, and any existing contents of the file's Data Fork are  
  73. not disturbed. 
  74.  
  75. Once the system files on the target Macintosh have been infected,  
  76. the virus will then begin to attack applications.  Not every  
  77. application is attacked by the virus - the determination of  
  78. whether or not to infect an application is apparently a random  
  79. decision (at this point, no discernible pattern has been found,  
  80. except that "Finder" and "MultiFinder" are usually attacked).   
  81. Applications that are attacked on one Macintosh may remain  
  82. "sterile" on another Mac, and vice versa.   
  83.  
  84. As each application is attacked, the virus installs a new CODE  
  85. resource into the application.  The identification of this new  
  86. resource is variable, depending upon the existing resources within  
  87. the application.  The virus looks for the first available CODE  
  88. resource slot, then places the new resource one position above  
  89. that.  For example, HyperCard contains CODE resources 0 through  
  90. 20, leaving an ID of 21 as the first available resource ID.  The  
  91. virus placed the new CODE resource in the application as CODE  
  92. ID=22. 
  93.  
  94. The second step of the infection of the application is the  
  95. modification of the CODE ID=0 resource of the application.  The  
  96. virus modifies the eleventh word of this resource, which is the  
  97. start of the application's jump table.  Where the application  
  98. would normally jump to the CODE ID=1 segment, the virus modifies  
  99. this pointer to refer to the new CODE resource that has just been  
  100. installed.  The example below shows the first sixteen words of a  
  101. installed.  The example below shows the first sixteen words of a  
  102. "sterile" and infected version of HyperCard: 
  103.  
  104.           Sterile                Infected 
  105.     0000 1EF0 0000 559C    0000 1EF0 0000 559C 
  106.     0000 1ED0 0000 0020    0000 1ED0 0000 0020 
  107.     0008 3F3C 0001 A9F0    0008 3F3C 0016 A9F0 
  108.     0000 3F3C 0001 A9F0    0000 3F3C 0001 A9F0 
  109.     ...                    ... 
  110.  
  111. Note that the eleventh word has been changed from "0001" to  
  112. "0016", which points to the new CODE ID=22 resource (hex 16 =  
  113. decimal 22).  Also note that during our examination of suspected  
  114. applications, we found that at least one compiler - LightSpeed C,  
  115. I think -  normally places non-"0001" values in the eleventh word  
  116. of the CODE ID=0 resource.  To verify infection if the eleventh  
  117. word is not "0001", check to see that the tenth word is NOT "4EED"  
  118. and that the eleventh word points to another CODE resource.  If  
  119. both of these are true, then the application is infected. 
  120.  
  121. The new CODE resource is a copy of the virus code, is of size  
  122. 7026, and is executed when the infected application is invoked.   
  123. When the virus completes execution, it returns to the invoked  
  124. application, which appears to proceed normally.  The first sixteen  
  125. words of the virus are: 
  126.  
  127.     0000 0001 xxxx 3F3C  
  128.     0001 A9F0 4EBA 002E 
  129.     204D D0FC 0020 43FA  
  130.     FFEC 20D9 2091 204D  
  131.     ... 
  132.  
  133. The third word of the virus code is variable, and appears to be  
  134. based on the return address used when the execution of the virus  
  135. is completed. The virus further modifies the code of the  
  136. application in a manner which has not been fully deciphered.  This  
  137. was determined by attempting to recover the HyperCard application  
  138. by removing the new CODE ID=22 resource and patching the eleventh  
  139. word of the CODE ID=0 resource.  Any attempt to run the rebuilt  
  140. application resulted in a system bomb, intimating that the virus  
  141. has modified other sections of the application which prevented  
  142. it's complete exorcism. 
  143.  
  144. Vaccinating your Macintosh: 
  145.  
  146. If your Macintosh is infected, the contaminated system files and  
  147. applications must be completely removed from the Macintosh, and  
  148. new ORIGINAL copies should be installed.  When removing the virus  
  149. from the Macintosh system files, you cannot just go in with  
  150. ResEdit and delete the offensive INIT resources - this virus is  
  151. apparently intelligent enough to recognize this attempt, and  
  152. modifies it's resource identification and memory location when  
  153. probed by resource utilities.  ResEdit "thinks" that the virus  
  154. resources have been deleted, but they have been renamed and will  
  155. return when the Macintosh is restarted.  The system must be  
  156. sterilized by: 
  157.  
  158. 1) Examine EVERY application (including any in the System Folder,  
  159. and on EVERY diskette you may have) you have with ResEdit, and  
  160. check if a new CODE resource has been added and if the CODE ID=0  
  161. resource has been modified to refer to the new CODE.  This is the  
  162. most tedious part of the process, and will probably take quite a  
  163. bit of time. I have about 160MB of stuff on two 100MB drives, and  
  164. this step took about three hours. If the application has been  
  165. infected, list it. 
  166.  
  167. 2) Using ResEdit, open the infected System Folder and locate the  
  168. "Desktop" file.  Select the file and use the "Get Info" option on  
  169. the  "File" menu.  When the file information window opens, turn  
  170. off the "Invisible" bit, then close the window and save the file  
  171. information.  Do the same for the "Scores" file. 
  172.  
  173. 3) Locate a sterile system diskette (preferably one of the "System  
  174. Tools" diskettes from Apple), LOCK IT, and boot from it. 
  175.  
  176. 4) Throw away the following files from the infected System Folder:  
  177. "System", "Finder", "MultiFinder", "Desktop", "Scores", "Scrapbook  
  178. File", and "Note Pad File".  Once these files are in the Trash  
  179. Can, EMPTY THE TRASH IMMEDIATELY!  Note: this is the minimum  
  180. required to remove the System portion of the virus - my personal  
  181. preference is to delete the ENTIRE System Folder, not just the  
  182. suspect files in it. 
  183.  
  184. 5) Locate all of the applications which you listed in Step 1.   
  185. Throw them away, and empty the Trash Can. 
  186.  
  187. 6) Shut down the Macintosh, and turn the power off.  Wait at least  
  188. 30 seconds for memory to clear before rebooting again from the  
  189. sterile diskette (this may not really be necessary, but better  
  190. safe than sorry). 
  191.  
  192. 7) Reinstall the Macintosh operating system from the System Tools  
  193. diskette to your Macintosh. 
  194.  
  195. 8) Locate your original copies of the deleted applications  
  196. software.  Before reinstalling the applications, examine each one  
  197. with ResEdit to be sure that it is sterile.  If there is no  
  198. problem, reinstall the application.   
  199.  
  200. A word of warning: 
  201.  
  202. The "Vaccine" CDEV which is currently appearing on bulletin boards  
  203. is only marginally useful in fighting this virus - if your system  
  204. is already infected when you install Vaccine, you will not get any  
  205. warning from Vaccine that the virus exists.  If you have Vaccine  
  206. installed on a sterile system, and this virus is introduced at a  
  207. later time, Vaccine will only warn you of the virus attack, but  
  208. will not prevent infection. 
  209.  
  210. I do not know how far this virus has spread, or where it came from  
  211. (although we are working on that).  The information contained  
  212. above reflects only what we know so far about this virus - I do  
  213. not know if it has any maliciously destructive functions which  
  214. have not yet activated, or if it does anything other than  
  215. replicate.  I do know that it is extremely virulent - it has  
  216. defensive mechanisms built in to protect itself from deletion,  
  217. most of it's resources are protected, and it places multiple  
  218. copies of it's components throughout the system to avoid  
  219. single-point-of-failure destruction.  This thing is an order of  
  220. magnitude more sophisticated than the MacMag virus, and is  
  221. considerably tougher to kill. 
  222.  
  223. So far, the virus appears to only affect system files and  
  224. application files.  Data files (documents, spreadsheet data,  
  225. HyperCard stacks, etc.) do not appear to be affected, and do not  
  226. seem to transmit the virus. 
  227.  
  228. While not apparently maliciously destructive, I have established  
  229. that the mere presence of this virus in the system is sufficient  
  230. to cause the printing and application instability problems (like  
  231. the ones we have been experiencing).  Once the virus has been  
  232. removed, all of our reported Macintosh problems have gone away.  I  
  233. believe that whoever wrote this could not foresee enough of the  
  234. potential system configurations to prevent an occasional collision  
  235. between the virus and other active applications and printer  
  236. drivers. 
  237.  
  238. Apple in Cuppertino has become intimately aware of this virus in  
  239. the last two days.  They are going to be working on a more  
  240. complete disassembly of the virus, and will hopefully be able to  
  241. determine exactly what this thing does. 
  242.